<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta name="description"
    content="The text should appear spread across four lines">
<style>
@page {
    size: 400pt 300pt;
    margin: 50pt;
}

html {
    font-family: sans-serif;
    font-size: 14pt;
    line-height: 18pt;
}

body {
    outline: thin solid rgb(0, 0, 0, 0.25);
}

p {
    margin: 0;
    outline: solid red;
}

span {
    position: relative;
    top: 18pt;
}
</style>
</head>

<body>
    <p>Lorem <span>ipsum <span>dolor sit <span>amet,</span> consectetur adipisici elit.</span></span></p>
</body>

</html>
